package com.czlis.boe;

import java.math.BigDecimal;

public class TestBigDecimal {
	public static void main(String[] args) {
		int viaCount = 5;
		int totCount = 19;
		double rate = (double)viaCount/ totCount ;
		System.out.println(rate);
		BigDecimal bg = new BigDecimal(rate+"").setScale(2, BigDecimal.ROUND_HALF_UP);
		System.out.println(bg.doubleValue());
		
		double a = 1.3d;
		double b = 1.4d;
		String.valueOf(a);
		BigDecimal a1 = new BigDecimal(a);
        BigDecimal b1 = new BigDecimal(b);
        System.out.println(a1.add(b1));
	}
}
